package com.stockz.ui.swing.charting.widget;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.stockz.core.util.SpringUtil;
import com.stockz.ui.swing.charting.util.DataUtil;
import com.stockz.ui.swing.widget.JButton;

public class ActiveBarButton extends JButton implements ActionListener {
	private static final long serialVersionUID = -3226584949905396232L;

	private DataUtil dataUtil;
	
	public ActiveBarButton() {
		super("Active Bar");
		dataUtil = SpringUtil.getApplicationContext().getBean(DataUtil.class);
		addActionListener(this);
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		dataUtil.downloadLatestBar();
	}
	
}
